<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>后台管理</title>
<style>
*{margin:0;padding:0;}
ul{list-style:none;}
img{border:0;}
body{background:#dfdfdf;font-size:12px;line-height:1.7;}
#logo{width:100%;height:auto;position:relative;padding-bottom:20px;}
#logo #title{position:absolute;display:block;right:150px;top:30px;font-size:30px;font-weight:bold;}
#logo #l_img{margin: 20px 0px 20px 100px;}
#login{border:10px solid #cccccc;margin:0 auto;}
#login tr{height:25px;line-height:25px;}
#login th{text-align:right;font-weight:normal;padding-left:5px;}
#login td{padding-right:5px;}
#submit{border:0;padding:5px 15px;cursor:pointer;background:#999999;color:white;font-weight:bold;margin-bottom:5px;margin-top:10px;}
.in{border:none;border-bottom:1px solid #999999;background:#dfdfdf;color:#333333;}
#code{border:none;background:#dfdfdf;width:70px;border-bottom:1px solid #999999;display:inline-block;vertical-align:bottom;font-size:18px;}
#logo a{color:#333333;text-decoration:none;position:absolute;right:100px;bottom:30px;}
#logo a:hover{color:#ff6600;}
</style>
<script src="./source/js/jquery-1.7.2.min.js"></script>
<script>
$(function(){
	$("#codeimg").click(function(){
		var src=$(this).attr("src");
		$(this).attr("src",src+"&"+Math.random());
	})
	$("form").submit(function(){
		var data=$(this).serialize();
		$.ajax({
			url:"admin.php?c=admin&m=login",
			type:"post",
			data:data,
			dataType:"json",
			success:function(data){
				if(data['state']!=4){
					alert(data['msg']);
				}else{
					window.location.href="admin.php?c=admin";
				}
			}
		})
		return false;
	})
})
</script>
</head>
<body>
<div id="logo">
	<img src="admin/source/images/blogo.jpg" id="l_img"/>
	<span id="title">后台管理</span>
	<a href="http://localhost/fenghaitong/index.php">回到首页</a>
</div>
<form action="<?php echo __CONTROL__;?>&m=login" method="post">
<table id="login">
<tr><th>用户名：</th><td><input type="text" name="user" class="in"/></td></tr>
<tr><th>密&nbsp;&nbsp;码：</th><td><input type="password" name="pwd" class="in"/></td></tr>
<tr><th>验证码：</th><td><input type="text" id="code" name="code"/><img src="<?php echo __CONTROL__;?>&m=code" style="cursor:pointer" id="codeimg"/></td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="登陆" id="submit"/></td></tr>
</table>
</form>
</body>
</html>
